home *** CD-ROM | disk | FTP | other *** search
- #
- # Zustands-▄berwachungs-Script
- # State Watch Script
- #
- # Flak
- #
- # created: 15-Jun-2000 Bernd
- #
- # (C) COPYRIGHT 2000 RADONLABS GMBH
- #
-
- proc observerwatch_normal {} {
-
- set tower [.getcreator]
-
- # Nur, um zu verzweigen
- if {[.iskilled] == "true"} {
- .setremoveable true
- leavevehicle
- } elseif {[$tower.getsleepmode] == "true"} {
- .announcestate offline
- } else {
- .announcestate waitsearch
- }
- }
-
- proc observerwatch_waitsearch {} {
-
- set tower [.getcreator]
-
- if {[.iskilled] == "true"} {
- .setremoveable true
- leavevehicle
- } elseif {"false" == [[.getclan].hasenergy]} {
- .deletettarget
- .announcestate outofwork
- } elseif {[$tower.getsleepmode] == "true"} {
- .announcestate offline
- } elseif {[.isshadow] == "false"} {
-
- # Suche Ziel und teste, ob es fuer uns geeignet ist.
- # Dies nur machen, wenn ich ein original bin.
- set tgt [.searchtarget]
- if { ($tgt != "null") && ([.testvehicleastarget $tgt] == "true") } {
- .setvehicletarget $tgt 300 true
- .announcestate observe
- }
- }
- }
-
- proc observerwatch_outofwork {} {
-
- set tower [.getcreator]
-
- if {[.iskilled] == "true"} {
- .setremoveable true
- leavevehicle
- } elseif {"true" == [[.getclan].hasenergy]} {
-
- # Strom wieder da
- .announcestate waitsearch
- } elseif {[$tower.getsleepmode] == "true"} {
- .announcestate offline
- }
- }
-
- proc observerwatch_offline {} {
-
- set tower [.getcreator]
-
- if {[.iskilled] == "true"} {
- .setremoveable true
- leavevehicle
- } elseif {"false" == [$tower.getsleepmode]} {
- .announcestate waitsearch
- }
- }
-
-
- proc observerwatch_observe {} {
-
- set tower [.getcreator]
-
- if {[.iskilled] == "true"} {
- .setremoveable true
- leavevehicle
- } elseif {[.hastarget] == "false"} {
- .announcestate waitsearch
- } elseif {[.istargetreachable] == "false"} {
- .deletetarget
- .announcestate waitsearch
- } elseif {[$tower.getsleepmode] == "true"} {
- .announcestate offline
- }
- }
-
-
- proc observerwatch_cinematic {} {
-
- # empty
- }
-